package com.baizhi.app;

import com.baizhi.po.VideoPo;
import com.baizhi.service.VideoService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("app")
public class AppController {
    @Resource
    VideoService videoService;
    @RequestMapping("queryByReleaseTime")
    public HashMap<String, Object> queryByReleaseTime(){
        HashMap<String, Object> map = new HashMap<>();
        List<VideoPo> list = videoService.queryByReleaseTime();
        map.put("message","查询成功");
        map.put("status",100);
        map.put("data",list);
        return map;
    }
}
